package com.focus.ctrl.demo.web.reqmap;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class HelloWorldController {
	@RequestMapping("/helloWorld/{id}")
	@ResponseBody
	public String helloWorld(Model model, @PathVariable() int id) {
		System.out.println(id);
		model.addAttribute("message", "Hello World!");
		return "helloWorld";
	}
}
